package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ResidentialBuildingsMapper;
import com.ruoyi.system.domain.ResidentialBuildings;
import com.ruoyi.system.service.IResidentialBuildingsService;

/**
 * residential_buildingsService业务层处理
 * 
 * @author wfj
 * @date 2025-11-23
 */
@Service
public class ResidentialBuildingsServiceImpl implements IResidentialBuildingsService 
{
    @Autowired
    private ResidentialBuildingsMapper residentialBuildingsMapper;

    /**
     * 查询residential_buildings
     * 
     * @param id residential_buildings主键
     * @return residential_buildings
     */
    @Override
    public ResidentialBuildings selectResidentialBuildingsById(String id)
    {
        return residentialBuildingsMapper.selectResidentialBuildingsById(id);
    }

    /**
     * 查询residential_buildings列表
     * 
     * @param residentialBuildings residential_buildings
     * @return residential_buildings
     */
    @Override
    public List<ResidentialBuildings> selectResidentialBuildingsList(ResidentialBuildings residentialBuildings)
    {
        return residentialBuildingsMapper.selectResidentialBuildingsList(residentialBuildings);
    }

    /**
     * 新增residential_buildings
     * 
     * @param residentialBuildings residential_buildings
     * @return 结果
     */
    @Override
    public int insertResidentialBuildings(ResidentialBuildings residentialBuildings)
    {
        residentialBuildings.setCreateTime(DateUtils.getNowDate());
        return residentialBuildingsMapper.insertResidentialBuildings(residentialBuildings);
    }

    /**
     * 修改residential_buildings
     * 
     * @param residentialBuildings residential_buildings
     * @return 结果
     */
    @Override
    public int updateResidentialBuildings(ResidentialBuildings residentialBuildings)
    {
        residentialBuildings.setUpdateTime(DateUtils.getNowDate());
        return residentialBuildingsMapper.updateResidentialBuildings(residentialBuildings);
    }

    /**
     * 批量删除residential_buildings
     * 
     * @param ids 需要删除的residential_buildings主键
     * @return 结果
     */
    @Override
    public int deleteResidentialBuildingsByIds(String[] ids)
    {
        return residentialBuildingsMapper.deleteResidentialBuildingsByIds(ids);
    }

    /**
     * 删除residential_buildings信息
     * 
     * @param id residential_buildings主键
     * @return 结果
     */
    @Override
    public int deleteResidentialBuildingsById(String id)
    {
        return residentialBuildingsMapper.deleteResidentialBuildingsById(id);
    }
}
